Optimal. Leaf size=44 \[ \frac{a^2 x^2}{2}+\frac{2 a b x^{n+2}}{n+2}+\frac{b^2 x^{2 (n+1)}}{2 (n+1)} \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0491267, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091 \[ \frac{a^2 x^2}{2}+\frac{2 a b x^{n+2}}{n+2}+\frac{b^2 x^{2 (n+1)}}{2 (n+1)} \]
Antiderivative was successfully verified.
[In] Int[x*(a + b*x^n)^2,x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [F] time = 0., size = 0, normalized size = 0. \[ a^{2} \int x\, dx + \frac{2 a b x^{n + 2}}{n + 2} + \frac{b^{2} x^{2 n + 2}}{2 \left (n + 1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate(x*(a+b*x**n)**2,x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.0561429, size = 37, normalized size = 0.84 \[ \frac{1}{2} x^2 \left (a^2+\frac{4 a b x^n}{n+2}+\frac{b^2 x^{2 n}}{n+1}\right ) \]
Antiderivative was successfully verified.
[In] Integrate[x*(a + b*x^n)^2,x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.014, size = 47, normalized size = 1.1 \[{\frac{{a}^{2}{x}^{2}}{2}}+{\frac{{b}^{2}{x}^{2} \left ({{\rm e}^{n\ln \left ( x \right ) }} \right ) ^{2}}{2+2\,n}}+2\,{\frac{ab{x}^{2}{{\rm e}^{n\ln \left ( x \right ) }}}{2+n}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int(x*(a+b*x^n)^2,x)
[Out]
_______________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2*x,x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.242504, size = 97, normalized size = 2.2 \[ \frac{{\left (b^{2} n + 2 \, b^{2}\right )} x^{2} x^{2 \, n} + 4 \,{\left (a b n + a b\right )} x^{2} x^{n} +{\left (a^{2} n^{2} + 3 \, a^{2} n + 2 \, a^{2}\right )} x^{2}}{2 \,{\left (n^{2} + 3 \, n + 2\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2*x,x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 1.45732, size = 201, normalized size = 4.57 \[ \begin{cases} \frac{a^{2} x^{2}}{2} + 2 a b \log{\left (x \right )} - \frac{b^{2}}{2 x^{2}} & \text{for}\: n = -2 \\\frac{a^{2} x^{2}}{2} + 2 a b x + b^{2} \log{\left (x \right )} & \text{for}\: n = -1 \\\frac{a^{2} n^{2} x^{2}}{2 n^{2} + 6 n + 4} + \frac{3 a^{2} n x^{2}}{2 n^{2} + 6 n + 4} + \frac{2 a^{2} x^{2}}{2 n^{2} + 6 n + 4} + \frac{4 a b n x^{2} x^{n}}{2 n^{2} + 6 n + 4} + \frac{4 a b x^{2} x^{n}}{2 n^{2} + 6 n + 4} + \frac{b^{2} n x^{2} x^{2 n}}{2 n^{2} + 6 n + 4} + \frac{2 b^{2} x^{2} x^{2 n}}{2 n^{2} + 6 n + 4} & \text{otherwise} \end{cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate(x*(a+b*x**n)**2,x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.214292, size = 126, normalized size = 2.86 \[ \frac{a^{2} n^{2} x^{2} + b^{2} n x^{2} e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 4 \, a b n x^{2} e^{\left (n{\rm ln}\left (x\right )\right )} + 3 \, a^{2} n x^{2} + 2 \, b^{2} x^{2} e^{\left (2 \, n{\rm ln}\left (x\right )\right )} + 4 \, a b x^{2} e^{\left (n{\rm ln}\left (x\right )\right )} + 2 \, a^{2} x^{2}}{2 \,{\left (n^{2} + 3 \, n + 2\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((b*x^n + a)^2*x,x, algorithm="giac")
[Out]